<?php
declare (strict_types=1);

namespace app\api\controller;
use app\api\model\User;
use app\BaseController;
use http\Params;

class Users extends BaseController
{
    public function index()
    {
        return view();
    }
    public function memberInfo()

    {
        $this->request->param('id');

        return view();
    }

    public function manage()
    {
        $typeName = $this->request->param('typeName');
        if ($typeName == 'getConfigure') {
            $configreName = $this->request->param('configreName');
            $robotId = $this->request->param('robotId');
            if ($configreName == 'xiTong') {
                $User = new User;
                return  $User->get_datas($robotId, $configreName);

            } else {
                $UserReply = new UserReply;
                return $UserReply->get_datas($robotId, $configreName);
            }

        } else if ($typeName == 'updMemberInfo') {
            //post处理

            $configreName = $this->request->param('configreName');

            $id = $this->request->param('wxId');
            $robotId = $this->request->param('robotName');
            $data = $this->request->param('data');
            $type = $this->request->param('type');
            $User = new User;
            return $User->edit_one_data($id, $data,$type);

        }




    }
}